<template>
  <div>
    <div class="title">热门推荐</div>
    <ul>
      <router-link tag="li" :to="'/detail/'+item.id" class="item border-bottom" v-for="item of list" :key="item.id">
        <img class="item-img" :src="item.imgUrl"/>
        <div class="item-info">
          <div class="item-title">{{item.title}}</div>
          <div class="item-desc">{{item.desc}}</div>
          <button class="item-button">查看详情</button>
        </div>
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    list: Array
  },
  data () {
    return {
    }
  },
  methods: {},
  components: {},
  computed: {}
}
</script>

<style lang="stylus" scoped>
  @import "~styles/mixins.styl"
  .title
    background: #eee
    text-indent: 0.2rem
    line-height: 0.8rem
    margin-top: 0.2rem

  .item
    display: flex
    height: 2.2rem
    .item-img
      width: 2rem
      height: 2rem
      padding 0.1rem
    .item-info
      flex: 1
      padding: 0.1rem
      min-width: 0
      .item-title
        line-height 0.54rem
        font-size: 0.32rem
        ellipse()
      .item-desc
        line-height: 0.4rem
        color: #ccc
        ellipse()
      .item-button
        line-height: 0.44rem
        border-radius: 0.06rem
        padding: 0 0.2rem
        margin-top: 0.16rem
        color: #ffffff
        background: #ff9600

</style>
